package day15.udpsocket01;

import java.io.IOException;
import java.net.*;

/**
 * @author Xiao
 * @date 2021/8/9
 */
public class UDPClient01 {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        byte[] bytes = "一条中华、一瓶茅台、一包龙井".getBytes();
        InetAddress address = InetAddress.getByName("Qz");
        int port = 12345;
        DatagramPacket dp = new DatagramPacket(bytes, bytes.length, address, port);
        ds.send(dp);
        ds.close();
    }
}
